﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FriendsNearby.Services;
using InSTEDD.Labs.Geo;
using FriendsNearby.Services.Entities;

namespace FriendsNearbyBot.Tests
{
	class MockPeopleNearby : IPeopleNearbyService
	{
		public Func<IEnumerable<PersonNearby>> GetPeopleNearby { get; set; }
		public Func<string, IList<PersonNearby>> GetPeopleNearbyuserId { get; set; }
		public Func<string, IEnumerable<PersonNearby>> GetAllFriends { get; set; }
		public delegate void GetPersonNearbyHandler(string userId, string userSearched, out LatLong loc, out double? distance);
		public delegate void GetPeopleNearbySummaryHandler(string userId, out int countFriendsNearby, out double? nearestDistance);
		public GetPeopleNearbySummaryHandler GetPeopleNearbySummary { get; set; }

		IList<PersonNearby> IPeopleNearbyService.GetPeopleNearby(string userId)
		{
			if (GetPeopleNearbyuserId != null)
				return GetPeopleNearbyuserId(userId);
			else
                return default(IList<PersonNearby>);
		}

        IList<PersonNearby> IPeopleNearbyService.GetAllPeople(string userId)
        {
            throw new NotImplementedException();
        }

		IEnumerable<PersonNearby> IPeopleNearbyService.GetAllFriends(string userId)
		{
			if (GetAllFriends != null)
				return GetAllFriends(userId);
			else
				return default(IEnumerable<PersonNearby>);
		}

        public IList<string> GetNotificationsForFacebookUser(string user)
        {
            throw new NotImplementedException();
        }

    }
}
